cust_no = [
    '1880000023',
    '1880000026',
    '1880000052',
    '1880000173',
    '1880000174',
    '1880001004',
    '1880001007',
    '1880001009',
    '1880024777',
    '1880025010',
    '1880025011',
    '1880050120',
    '1880050121',
    '1880050122',
    '1880050123',
    '1880050124',
    '1880050125',
    '1880050126',
    '1880050127',
    '1880050128',
    '1880050129',
    '1880050130',
    '1880050131',
    '1880050132',
    '1880050133',
    '1880050134',
    '1880050135',
    '1880050136',
    '1880050137',
    '1880050138',
    '1880050139',
    '1880050140',
    '1880050141',
    '1880050142',
    '1880050143',
    '1880050144',
    '1880050145',
    '1880050146',
    '1880050147',
    '1880050148',
    '1880050149',
    '1880050150',
    '1880050151',
    '1880050267',
    '1880070200',
    '1880070201',
    '1880070202',
    '1880070203',
    '1880070204',
    '1880070205',
    '1880073380',
    '1880073381',
    '1880073382',
    '1880073383',
    '1880073384',
    '1880073385',
    '1880073386',
    '1880073387',
    '1880073388',
    '1880073389',
    '1880076552',
    '1880076553',
    '1880079060',
    '1880079061',
    '1880079062',
    '1880079063',
    '1880079064'
]
f = open('file.sql', mode='a', encoding='utf8')
for i in cust_no:
    if i[3:6] == '000':
        branch_code = '005'
    else:
        branch_code = i[3:6]
    sql = f"INSERT INTO KS.CUST_CREDIT_INFO (CUST_NO, CREDIT_LEVEL_CODE, CURRENCY_TYPE, TOP_CREDIT, PC_MODE, CREDIT_USEMODE, ISBLACKLIST, PAYBACK_MODE, BOND_NO, BOND_STATUS, INSTITUTION_CODE, CRFUND_PRODUCT_ID, CRSTOCK_PRODUCT_ID, EXTERNAL_CREDIT_LIMIT, CREDIT_FUND_LIMIT, CREDIT_STOCK_LIMIT, BOND_BEGIN_DATE, BOND_END_DATE)\
            values('{i}', '1001', '01', 2500000, '2', '1', '2', '2', '{branch_code}{i}002', '1', {branch_code}, '0001', '0099', 2500000, 1000000, 1500000, '20101023', '20301231');\n"
    f.writelines(sql)
